/**
 * ****************************** ICE *******************************
 * ========================================================================
 * Project:  icetalk
 * Package: org.ice4apps.talk.entity 
 * File:  UserSessionMessage.java
 * Author: biju
 * Date: Dec 10, 2009
 * Description:
 * ========================================================================
 */
package org.ice4apps.talk.entity;


/**
 * @author biju
 * This Bean class will encapsulate the User and the Message for the USer Session Manager
 * Since all these message types are not of the same type, we need to do type it as type Java Object 
 */

public class UserSessionMessage {
	
	private final User user;
	private final MessageType messageType;
	private final UserSessionType userSessionType;
	private final String sessionId;
	private Object message;
	
	
	public UserSessionMessage (MessageType messageType,
			UserSessionType messageDestinationType,
			String sessionId,
			User user,
			Object message)
	{
		this.messageType = messageType;
		this.userSessionType = messageDestinationType;
		this.sessionId = sessionId;
		this.user = user;
		this.message = message;
	}
	
	/**
	 * @return the messageType
	 */
	public MessageType getMessageType() {
		return messageType;
	}

	/**
	 * @return the user
	 */
	public User getUser() {
		return user;
	}

	/**
	 * @param message the message to set
	 */
	public void setMessage(Object message) {
		this.message = message;
	}

	/**
	 * @return the message
	 */
	public java.lang.Object getMessage() {
		return message;
	}

	/**
	 * @return the msgSourceType
	 */
	public UserSessionType getMessageDestinationType() {
		return userSessionType;
	}

	/**
	 * @return the sessionId
	 */
	public String getSessionId() {
		return sessionId;
	}
}